<?php

/*
 * Fresns Control Panel (Standalone)
 * Copyright (C) 2021-Present 刘鑫
 * Released under the MIT License.
 */

use App\Http\Center\Helper\PluginHelper;

if (PluginHelper::pluginCanUse('FcpApi')) {
    Route::group(['prefix' => 'admin', 'middleware' => 'auth:api', 'namespace' => '\App\Plugins\FcpApi\TweetConfigs'], function () {
        Route::get('/tweetconfigs/index', 'FsControllerAdmin@index')->name('admin.tweetconfigs.index');
        //更新排序
        Route::post('/tweetconfigs/updateRankNum', 'FsControllerAdmin@updateRankNum')->name('admin.tweetconfigs.updateRankNum');
        Route::post('/tweetconfigs/store', 'FsControllerAdmin@store')->name('admin.tweetconfigs.store');
        Route::post('/tweetconfigs/update', 'FsControllerAdmin@update')->name('admin.tweetconfigs.update');
        Route::post('/tweetconfigs/destroy', 'FsControllerAdmin@destroy')->name('admin.tweetconfigs.destroy');
        Route::get('/tweetconfigs/detail', 'FsControllerAdmin@detail')->name('admin.tweetconfigs.detail');
        Route::get('/tweetconfigs/export', 'FsControllerAdmin@export')->name('admin.tweetconfigs.export');
        //语言设置
        Route::post('/tweetconfigs/storeLang', 'FsControllerAdmin@storeLang')->name('admin.tweetconfigs.storeLang');
        Route::post('/tweetconfigs/updateLang', 'FsControllerAdmin@updateLang')->name('admin.tweetconfigs.updateLang');
        Route::post('/tweetconfigs/destroyLang', 'FsControllerAdmin@destroyLang')->name('admin.tweetconfigs.destroyLang');
        //通过七大洲id获取对应的地区代码
        Route::get('/tweetconfigs/getAreaCode', 'FsControllerAdmin@getAreaCode')->name('admin.tweetconfigs.getAreaCode');
        //是否开启多语言
        Route::post('/tweetconfigs/updateLanguageStatus', 'FsControllerAdmin@updateLanguageStatus')->name('admin.tweetconfigs.updateLanguageStatus');
        //默认语言
        Route::post('/tweetconfigs/updateDefaultLanguage', 'FsControllerAdmin@updateDefaultLanguage')->name('admin.tweetconfigs.updateDefaultLanguage');
        //查看语言包
        Route::post('/tweetconfigs/pack/index', 'FsControllerAdmin@packIndex')->name('admin.tweetconfigs.packIndex');
        //新增语言包
        Route::post('/tweetconfigs/pack/store', 'FsControllerAdmin@packStore')->name('admin.tweetconfigs.packStore');
        //编辑
        Route::post('/tweetconfigs/pack/update', 'FsControllerAdmin@packUpdate')->name('admin.tweetconfigs.packUpdate');
        //删除
        Route::post('/tweetconfigs/pack/destroy', 'FsControllerAdmin@packDestroy')->name('admin.tweetconfigs.packDestroy');
        //地图设置
        Route::get('/tweetconfigs/map/index', 'FsControllerAdmin@mapIndex')->name('admin.tweetconfigs.mapIndex');
        Route::post('/tweetconfigs/map/store', 'FsControllerAdmin@mapStore')->name('admin.tweetconfigs.mapStore');
        Route::post('/tweetconfigs/map/update', 'FsControllerAdmin@mapUpdate')->name('admin.tweetconfigs.mapUpdate');
    });
}